A home network technology is a home information platform that integrates a home control network and a multimedia information network, and can be used to implement interconnection and management of various intelligent household appliance devices, communications devices, information devices, and the like in a home range. With an ever-increasing requirement of home networks for bandwidth, and an increasing demand of users for service diversification, the home network (G.hn) standard approved by the international telecommunication union-telecommunication standardization sector (ITU-T) in 2010 can therefore support transmission media such as a power line, a coaxial cable, and a telephone line, and is a unified home network standard.
A home network based on G.hn may include one or more domains, and a domain is generally a centralized management network. In a domain, there is a domain master controller (DM), that is, a domain master node. In addition to having a communication function of an ordinary node, the DM further needs to be responsible for management of the entire domain, for example, creation of the domain, node registration, bandwidth allocation and resource scheduling of the domain, coordination with multiple adjacent domains or networks, and network power consumption management. For a domain working in a security mode, the domain further includes a security controller (SC). The SC is responsible for authentication of a node in the domain and key management. Registered nodes all need to be authenticated by the SC before obtaining a key to perform secure data transmission.
The DM performs domain management and resource scheduling by periodically broadcasting a media access plan (MAP) frame at a media access control (MAC) layer, where the MAP frame indicates a start time of a next MAC cycle, transmission opportunity allocation for resource scheduling for nodes, and a related parameter needed for domain working. Because there may be hidden nodes in the domain and these nodes cannot directly communicate with the DM, the DM may designate some nodes as MAP relay nodes, and arrange these MAP relay nodes to send a relayed media access plan (RMAP) frame.
In a G.hn-based home network, a joining node joins, in a push-button pairing manner, a domain working in a security mode. The manner includes the following.
First, a pairing button is pushed at a DM in the domain, or a pairing button is pushed at any ordinary node in the domain, and the ordinary node notifies the DM of the pairing button pushed event by using an existing network.
After the pairing button is pushed or the notification of the pairing button pushed event is received, the DM opens a 120-second window for allowing a pairing request, and broadcasts, in each MAC cycle, a MAP frame carrying corresponding indication information.
Within 120 seconds after the pairing button is pushed at the DM or within 120 seconds after the pairing button is pushed at the ordinary node, a pairing button is pushed at a joining node, and after receiving the MAP frame from the domain, the joining node sends a registration request to the DM.
The DM receives the registration request of the joining node, and after determining to accept the joining node, sends, to the joining node, a registration confirmation message indicating that registration succeeds, where the registration confirmation message carries a password needed in a domain authentication process.
After receiving the registration confirmation message, the joining node initiates an authentication procedure to an SC in the domain according to the password in the registration confirmation message and an existing security authentication mechanism, and after authentication succeeds, the joining node may perform data transmission in the domain.
120 seconds after the DM opens the window for allowing a pairing request, the DM closes the window.
Obviously, when a joining node joins a domain in the foregoing manner, pairing buttons need to be separately pushed at any node in the domain and the joining node, and a moment at which the pairing button is pushed at the joining node needs to be within 120 seconds after a moment at which the pairing button is pushed at the any node in the domain; otherwise, the joining node cannot join the domain. Therefore, a misoperation easily occurs, resulting in a network joining failure. In addition, in actual application, a result of joining a secure domain in a push-button pairing manner is quite uncertain, and a network joining success rate is relatively low.